WSL 2 Setup

WSL 1 is fantastic, but lacks some of the features (namely fstab mounting) that WSL 2 brings to the table. WSL and WSL 2 are a bit confusing to setup because of the lack of centralization; "Go to the Windows Features panel, then download this random EXE from a browser...".

There are multiple ways to go about conducting this, but here's the simplest way to setup both versions.

Install WSL 1

Open PowerShell as administrator (Shortcut: Windows + x, then hit a, then Alt + y).

Put these two commands into the PowerShell window:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Hit enter a few times.

Once the commands are done running, restart your computer. Yes, you're still forced to restart Windows in 2022 for feature additions.

Now, you must choose a distro. I prefer Debian. The other installations are the same process, so choose whatever. You have two options depending on your Windows 10 version:

Windows Store Method

Just type the distro you want into the search bar - like Ubuntu - and hit the install button. When that's done, open the distro EXE you downloaded from the MS store and go through the installation process. You can find it by hitting the Start button and typing the distro name.

Internet Download

Skip this step if you've already done the Windows Store Method.

Click one of these distro links:

That should be all of the officially supported ones hosted by Microsoft.

After the download, open a PowerShell window as administrator once again. Then, navigate to the directory you downloaded the appx file at (probably your downloads directory), then run the following commmand (note: the file name will be different depending on your distro):

Add-AppxPackage Debian.appx

Then, run the newly installed EXE on your system. If you installed Debian, run the Debian program, if you installed Ubuntu, run the Ubuntu program, and so on. Go through the setup process until your new user is created.

That's WSL 1 + distro installation complete. Now we can convert this WSL 1 distro to WSL 2 to get those oh-so-fantastic features.

WSL 2 Installation

Open a PowerShell window as administrator once again. Run the following commmand (note: the file name will be different depending on your distro):

wsl --set-version Debian 2

This will take a minute, but once it's done, you'll have WSL 2. Easy as that.


Check out these articles...
2024-02-16 20:21:36 Meta Quest 3 Shortcuts
2024-05-28 21:50:47 VMware Workstation Download Post-Broadcom
2023-11-14 21:13:36 Server Neofetch 2023
2023-09-17 08:29:34 Using cwm On OpenBSD
2023-10-26 00:05:08 Infinite VMware Workstation Pro Free Trials